// cross browser xpath(ish) in html document
var docPath = function(startNode, action){
	if(typeof(startNode) == "string") startNode = obj(startNode);
	if(typeof(startNode) == "undefined") return false;
	var docPathArray = function(node, pathLeft){
		var result = new Array();
		var pathStep = pathLeft.shift();
		var nodes = node.childNodes;
		for(var t=0; t<nodes.length; t++){
			if(nodes[t].nodeType == 1){
				// node path
				if( (nodes[t].tagName.toLowerCase() == pathStep || pathStep == '*') || (nodes[t].tagName.toLowerCase() == pathStep.split("@")[0] && nodes[t].attributes[pathStep.split("@")[1]]) ){
					// store for recursive call
					if(pathLeft.length > 0){
						var tmp = docPathArray(nodes[t], [].concat(pathLeft));
						// if found something
						if(tmp.length > 0) result.push(tmp);
					}
					// result
					else basket.push(nodes[t]);
				}
			}
		}
		return result;
	};
	var basket = new Array();
	docPathArray(startNode, action.toLowerCase().split('/'));
	return basket;
};
